package com.jkrohn.io2011.AccessibleYouTube;

public class YouTubeResult {
	String title;
	String url;
	String author;
	int rating = -1;
	
	
	
	@Override
	public String toString() {
		String output = title + ".\n" + "Video by " + author + ".\n" + captionRatingString();
		return output;
	}
	
	public YouTubeResult(String title, String url, String author, int rating) {
		this.title = title;
		this.url = url;
		this.author = author;
		this.rating = rating;
	}
	
	public String captionRatingString() {
		if(rating == -1) {
			return "Captions not yet rated.";
		}
		else {
			return "Caption rating " + rating + ".";
		}
	}
}
